import { computed } from "vue"
import { usePageScrollTop } from "@/pages/hy/scenic/hooks/usePageScrollTop"

export function useIsReached(triggerHeight: number = 160) {
	const { scrollTop } = usePageScrollTop()

	// 是否达到指定高度
	const isReached = computed(() => {
		return scrollTop.value >= triggerHeight
	})

	return {
		isReached,
		scrollTop,
	}
}
